home *** CD-ROM | disk | FTP | other *** search
Wrap
/*************************************/ /* Image Engineer Macro */ /* by Savel */ /* Scale a given image by any */ /* size and autocrop border. (c)1997 */ /*************************************/ address IMAGEENGINEER Options results signal on error /* Setup a place for errors to go */ if arg()==0 then exit PARSE ARG source dest sizex sizey /* say source say dest say sizex say sizey */ 'TYPE 24bit' OPEN source Project=RESULT AUTOCROP Project Project2=RESULT Close Project SCALE Project2 sizex sizey BEST Project=RESULT Close Project2 'SAVE_DATA 'Project' 'dest' "JPEG (IJG-JFIF)"' Close Project exit /*******************************************************************/ /* This is where control goes when an error code is returned by IE */ /* It puts up a message saying what happened and on which line */ /*******************************************************************/ error: if RC=5 then do /* Did the user just cancel us? */ IE_TO_FRONT LAST_ERROR 'REQUEST "'||RESULT||'"' exit end else do IE_TO_FRONT LAST_ERROR 'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!' exit end